package com.wt.mapper;

import com.wt.entities.Account;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created with IDEA
 * Describe:
 * Author:tianji
 * Date:2018/11/1
 * Time:18:04
 */
//@Mapper
public interface AccountMapper {
    @Select("select * from account")
    public List<Account> getAllAccount();

    @Select("select * from account where id = #{id}")
    public Account getAccountById(String id);

    @Delete("delete from account where id = #{id}")
    public int deleteAccount(String id);

    @Insert("insert into account(id,login,name,pass) values(#{id},#{login},#{name},#{pass})")
    public int insertAccount(Account account);

    @Update("update account set name = #{account} where id = #{id}")
    public int updateAccount(Account account);
}
